﻿<UserControl x:Class="personalplaner.gui.common.views.InitWizardYearView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:p="clr-namespace:personalplaner.gui.Properties"
             xmlns:conv="clr-namespace:personalplaner.common.converters;assembly=personalplaner.common"
             mc:Ignorable="d" >
    
    <Control.Resources>
        <conv:DateTimeToIsoConverter x:Key="dateToIso"/>
    </Control.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <TextBlock Text="{x:Static p:Resources.PlanungsJahr}" FontSize="22" FontWeight="Thin" Foreground="#E1000000" Margin="50,-5,0,15"/>

        <TextBlock Text="{x:Static p:Resources.SelectPlanungsJahr}" FontSize="14" Grid.Row="1" Margin="20,40,20,20" TextWrapping="Wrap" VerticalAlignment="Top"/>
        
        <Grid Grid.Row="2" Margin="20,0,20,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <TextBlock Text="{x:Static p:Resources.Jahr}" FontWeight="Heavy" />
            <ComboBox ItemsSource="{Binding Years}" SelectedItem="{Binding SelectedYear}" Grid.Column="1" Width="150" HorizontalAlignment="Left"/>

            <TextBlock Text="{x:Static p:Resources.Zeitraum}" Grid.Row="1" FontWeight="Heavy"/>
            <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" Margin="2,3,0,3" >
                <TextBlock Text="{Binding Von, Converter={StaticResource dateToIso}}"/>
                <TextBlock Text="-" Margin="5,0,5,0"/>
                <TextBlock Text="{Binding Bis, Converter={StaticResource dateToIso}}"/>
            </StackPanel>
        </Grid>

    </Grid>
</UserControl>
